package com.shop.cloud.model.request;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.shop.cloud.domain.hongfu.GoodsInventory;

import io.swagger.annotations.ApiModelProperty;
import lombok.ToString;

@ToString(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler", "fieldHandler" }, ignoreUnknown = true)
public class EditGoodsRequest {
	
	@JsonProperty("id")
	@ApiModelProperty(value = "商品id", example = "", required = true)
	private Long id;
	
	@JsonProperty("categoryId")
	@ApiModelProperty(value = "分类id", example = "", required = true)
	private Long categoryId;

	@JsonProperty("brandId")
	@ApiModelProperty(value = "品牌id", example = "", required = true)
	private Long brandId;
	
	@JsonProperty("name")
	@ApiModelProperty(value = "商品名称", example = "", required = false)
	private String name;
	
	@JsonProperty("priceType")
	@ApiModelProperty(value = "价格类型，1为元，2为积分", example = "", required = false)
	private int priceType;
	
	@JsonProperty("price")
	@ApiModelProperty(value = "商品价格，积分或金额", example = "", required = false)
	private Float price;
	
	@JsonProperty("marketPrice")
	@ApiModelProperty(value = "市场价", example = "", required = false)
	private Float marketPrice;
	
	@JsonProperty("type")
	@ApiModelProperty(value = "1鸿福商城，2积分商城，3旅游商品", example = "", required = false)
	private int type;
	
	@JsonProperty("haveFeature")
	@ApiModelProperty(value = "是否有规格设置。0否，1是", example = "", required = false)
	private int haveFeature;
	
	@JsonProperty("selectedFeatures")
	@ApiModelProperty(value = "选择的商品规格,关键词feature后面跟的是规格id号，当haveFeature＝1时有效。", example = "'1':['1','2','3'],'feature2':['1','2','3']", required = false)
	private Map<Long, List<Long>> selectedFeatures;
	
	@JsonProperty("goodsInventorys")
	@ApiModelProperty(value = "商品库存配置列表。当haveFeature＝1时有效。", example = "", required = false)
	private List<GoodsInventory> goodsInventorys;
	
	@JsonProperty("totalInventory")
	@ApiModelProperty(value = "商品总库存", example = "", required = false)
	private int totalInventory;
	
	@JsonProperty("warnedInventory")
	@ApiModelProperty(value = "商品库存预警值", example = "", required = false)
	private int warnedInventory;
	
	@JsonProperty("pics")
	@ApiModelProperty(value = "商品图片集合", example = "", required = false)
	private List<String> pics;
	
	@JsonProperty("detail")
	@ApiModelProperty(value = "商品描述", example = "", required = false)
	private String detail;
	
	@JsonProperty("isSpecialPrice")
	@ApiModelProperty(value = "是否特价商品，0否，1是", example = "", required = true)
	private int isSpecialPrice;
	
	@JsonProperty("specialPrice")
	@ApiModelProperty(value = "特价价格，当isSpecialPrice=1时有效", example = "", required = false)
	private Float specialPrice;
	
	@JsonProperty("specialStartTime")
	@ApiModelProperty(value = "特价开始时间，格式：YYYY-mm-dd hh:mm:ss，当isSpecialPrice=1时有效", example = "", required = false)
	private Timestamp specialStartTime;
	
	@JsonProperty("specialEndTime")
	@ApiModelProperty(value = "特价结束时间，格式：YYYY-mm-dd hh:mm:ss，当isSpecialPrice=1时有效", example = "", required = false)
	private Timestamp specialEndTime;
	
	@JsonProperty("isDistribution")
	@ApiModelProperty(value = "是否分销提成，0否，1是", example = "", required = true)
	private int isDistribution;
	
	@JsonProperty("distributionSet")
	@ApiModelProperty(value = "分销设置，当isDistribution=1时有效。列表形式，从1级开始往下，例如[20,12.5]", example = "", required = false)
	private List<Float> distributionSet;
	
	@JsonProperty("featureImages")
	@ApiModelProperty(value = "商品规格图片集合,关键词为规格id的集合，如[1,2]", example = "", required = false)
	private Map<String,String> featureImages;
	
	@JsonProperty("startArea")
	@ApiModelProperty(value = "出发地", example = "", required = false)
	private String startArea;

	@JsonProperty("roleId")
	@ApiModelProperty(value = "店铺id", example = "", required = false)
	private int roleId;
	
	private String[] img;
	
	@JsonProperty("goodsProduct")
	@ApiModelProperty(value = "商品规格json串", example = "", required = false)
	private String goodsProduct;
	
	private String title;
	
	private String remark;
	
	private String firstPlace;

	/**
	 * @return the img
	 */
	public String[] getImg() {
		return img;
	}

	/**
	 * @param img the img to set
	 */
	public void setImg(String[] img) {
		this.img = img;
	}

	/**
	 * @return the goodsProduct
	 */
	public String getGoodsProduct() {
		return goodsProduct;
	}

	/**
	 * @param goodsProduct the goodsProduct to set
	 */
	public void setGoodsProduct(String goodsProduct) {
		this.goodsProduct = goodsProduct;
	}

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the remark
	 */
	public String getRemark() {
		return remark;
	}

	/**
	 * @param remark the remark to set
	 */
	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * @return the firstPlace
	 */
	public String getFirstPlace() {
		return firstPlace;
	}

	/**
	 * @param firstPlace the firstPlace to set
	 */
	public void setFirstPlace(String firstPlace) {
		this.firstPlace = firstPlace;
	}

	/**
	 * @return the roleId
	 */
	public int getRoleId() {
		return roleId;
	}

	/**
	 * @param roleId the roleId to set
	 */
	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	public String getStartArea() {
		return startArea;
	}

	public void setStartArea(String startArea) {
		this.startArea = startArea;
	}

	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public Long getBrandId() {
		return brandId;
	}

	public void setBrandId(Long brandId) {
		this.brandId = brandId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getPriceType() {
		return priceType;
	}

	public void setPriceType(int priceType) {
		this.priceType = priceType;
	}

	public Float getPrice() {
		return price;
	}

	public void setPrice(Float price) {
		this.price = price;
	}

	public Float getMarketPrice() {
		return marketPrice;
	}

	public void setMarketPrice(Float marketPrice) {
		this.marketPrice = marketPrice;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getHaveFeature() {
		return haveFeature;
	}

	public void setHaveFeature(int haveFeature) {
		this.haveFeature = haveFeature;
	}

	public Map<Long, List<Long>> getSelectedFeatures() {
		return selectedFeatures;
	}

	public void setSelectedFeatures(Map<Long, List<Long>> selectedFeatures) {
		this.selectedFeatures = selectedFeatures;
	}

	public List<GoodsInventory> getGoodsInventorys() {
		return goodsInventorys;
	}

	public void setGoodsInventorys(List<GoodsInventory> goodsInventorys) {
		this.goodsInventorys = goodsInventorys;
	}

	public int getTotalInventory() {
		return totalInventory;
	}

	public void setTotalInventory(int totalInventory) {
		this.totalInventory = totalInventory;
	}

	public int getWarnedInventory() {
		return warnedInventory;
	}

	public void setWarnedInventory(int warnedInventory) {
		this.warnedInventory = warnedInventory;
	}

	public List<String> getPics() {
		return pics;
	}

	public void setPics(List<String> pics) {
		this.pics = pics;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public int getIsSpecialPrice() {
		return isSpecialPrice;
	}

	public void setIsSpecialPrice(int isSpecialPrice) {
		this.isSpecialPrice = isSpecialPrice;
	}

	public Float getSpecialPrice() {
		return specialPrice;
	}

	public void setSpecialPrice(Float specialPrice) {
		this.specialPrice = specialPrice;
	}

	/**
	 * @return the specialStartTime
	 */
	public Timestamp getSpecialStartTime() {
		return specialStartTime;
	}

	/**
	 * @param specialStartTime the specialStartTime to set
	 */
	public void setSpecialStartTime(Timestamp specialStartTime) {
		this.specialStartTime = specialStartTime;
	}

	/**
	 * @return the specialEndTime
	 */
	public Timestamp getSpecialEndTime() {
		return specialEndTime;
	}

	/**
	 * @param specialEndTime the specialEndTime to set
	 */
	public void setSpecialEndTime(Timestamp specialEndTime) {
		this.specialEndTime = specialEndTime;
	}

	public int getIsDistribution() {
		return isDistribution;
	}

	public void setIsDistribution(int isDistribution) {
		this.isDistribution = isDistribution;
	}

	public List<Float> getDistributionSet() {
		return distributionSet;
	}

	public void setDistributionSet(List<Float> distributionSet) {
		this.distributionSet = distributionSet;
	}

	public Map<String,String> getFeatureImages() {
		return featureImages;
	}

	public void setFeatureImages(Map<String,String> featureImages) {
		this.featureImages = featureImages;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
}
